<?php if ( ! defined('BASEPATH')) exit('el acceso directo a esta página no esta permitido.');
class home extends ci_controller {

   function __construct()
   {
     parent::__construct();
     $this->load->model('dispositivos_model','dispositivos');
   }

   function index()
   {
     $this->load->helper('html');
     if($this->session->userdata('logged_in'))
     {
        $session_data = $this->session->userdata('logged_in');
        $data['menu'] = menu_ul('home',$session_data['tipousuario']);
        $data['title'] = "POSMobile - Home";
        $this->load->view('partials/header', $data);
        $this->load->view('pages/home_view', $data);
        $this->load->view('partials/footer');
     } else redirect('login');
     
   }

   function logout()
   {
     $this->session->unset_userdata('logged_in');
     session_destroy();
     redirect('home');
   }

}

/* end of file home.php */
/* location: ./application/controllers/home.php */
